import { useState } from 'react';
import { IoMdHeart } from 'react-icons/io';
interface Props {
  itemClicked: () => void;
}
const Like = ({ itemClicked }: Props) => {
  const [color, setColor] = useState('');
let a = 0;
  const handleCilir = () => {
    itemClicked();
    color ? setColor('') : setColor('red');
    console.log(a++);
    console.log(color);
  };
  return (
    <>
      <IoMdHeart color={color} onClick={handleCilir} size={50}></IoMdHeart>
    </>
  );
};

export default Like;
